home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96a.txt
/
000082_icon-group-sender _Mon Apr 15 01:29:15 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1996-09-05
|
761b
Received: by cheltenham.cs.arizona.edu; Mon, 15 Apr 1996 07:00:34 MST
Date: 15 Apr 96 09:27:09 BST
From: R J Hare <rjhare@tattoo.ed.ac.uk>
Subject: random numbers...
To: icon-group@cs.arizona.edu
Reply-To: rjhare@ed.ac.uk
Organisation: Edinburgh University Computing Services
Message-Id: <9604150927.ab22893@uk.ac.ed.tattoo>
Errors-To: icon-group-errors@cs.arizona.edu
Status: O
I'm writing a graphics program which requires that I perturb my x and
y values randomly by -1|0|1 before plotting the object at the new x and y.
There seem to be 2 obvious ways of doing this:
x := x-2+?3
y := y-2+?3
or:
x := x+?[-1,0,1]
y := y+?[-1,0,1]
Which is 'best' (quicker, easier to read, etc.)?
Opinions please...
Thanks
Roger Hare.